﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using AutoPartsSearch.Domain.Entities.Messages;
using AutoPartsSearch.Web.Infrastructure.Concrete;

namespace AutoPartsSearch.Web.Controllers
{
    public class EmailController : Controller
    {
        //
        // GET: /Email/

        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Index(Message message)
        {
            SmtpMessageSender messageSender = new SmtpMessageSender();
            messageSender.Send(message);
            return Content("was sent");
        }

    }
}
